<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>后台管理</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <!-- stylesheets -->
    <link rel="stylesheet" type="text/css" href="${resource(dir:'/')}resources/css/reset.css" />
    <link rel="stylesheet" type="text/css" href="${resource(dir:'/')}resources/css/style.css" media="screen" />
    <link id="color" rel="stylesheet" type="text/css" href="${resource(dir:'/')}resources/css/colors/blue.css" />
    <!-- scripts (jquery) -->
    <script src="${resource(dir:'/')}resources/scripts/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script src="${resource(dir:'/')}resources/scripts/jquery-ui-1.8.custom.min.js" type="text/javascript"></script>
    <script src="${resource(dir:'/')}resources/scripts/smooth.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            style_path = "${resource(dir:'/')}resources/css/colors";

            $("input.focus").focus(function () {
                if (this.value == this.defaultValue) {
                    this.value = "";
                }
                else {
                    this.select();
                }
            });

            $("input.focus").blur(function () {
                if ($.trim(this.value) == "") {
                    this.value = (this.defaultValue ? this.defaultValue : "");
                }
            });

            $("input:submit, input:reset").button();
        });
    </script>
</head>
<body>
<div id="login">
    <!-- login -->
    <div class="title">
        <h5>登录后台管理</h5>
        <div class="corner tl"></div>
        <div class="corner tr"></div>
    </div>
    <g:if test="${flash.message}">
        <div class="messages">
            <div id="message-error" class="message message-error">
                <div class="image">
                    <img src="${resource(dir:'/')}resources/images/icons/error.png" alt="Error" height="32" />
                </div>
                <div class="text">
                    <h6>错误信息</h6>
                    <span>${flash.message}</span>
                </div>
                <div class="dismiss">
                    <a href="#message-error"></a>
                </div>
            </div>
        </div>
    </g:if>

    <div class="inner">
        <form action="${postUrl}" method="post">
            <div class="form">
                <!-- fields -->
                <div class="fields">
                    <div class="field">
                        <div class="label">
                            <label for="username">帐号:</label>
                        </div>
                        <div class="input">
                            <input type="text" id="username" name="j_username" size="40" value="admin" class="focus" />
                        </div>
                    </div>
                    <div class="field">
                        <div class="label">
                            <label for="password">密码:</label>
                        </div>
                        <div class="input">
                            <input type="password" id="password" name="j_password" size="40" value="qw!@1211" class="focus" />
                        </div>
                    </div>
                    <div class="field">
                        <div class="checkbox">
                            <input type="checkbox" class="checkbox" name="${rememberMeParameter}" id="remember_me" checked="checked" />
                            <label for="remember_me">记住我</label>
                        </div>
                    </div>
                    <div class="buttons">
                        <input type="submit" value="登录" />
                        <s2ui:linkButton elementId='register' controller='register' text="注册帐号"/>
                    </div>
                </div>
                <!-- end fields -->
                <!-- links -->
                <div class="links">
                <g:link controller='register' action='forgotPassword'>忘记密码</g:link>
                </div>
                <!-- end links -->
            </div>
        </form>
    </div>
    <!-- end login -->
    <div id="colors-switcher" class="color">
        <a href="" class="blue" title="Blue"></a>
        <a href="" class="green" title="Green"></a>
        <a href="" class="brown" title="Brown"></a>
        <a href="" class="purple" title="Purple"></a>
        <a href="" class="red" title="Red"></a>
        <a href="" class="greyblue" title="GreyBlue"></a>
    </div>
</div>
</body>
</html>